﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace UI
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            win = this;
            GalaSoft.MvvmLight.Messaging.Messenger.Default.Register<Page>(this,  "MenuChangePage",ChangeMenu);

            txt_UserName.Text = Comm.TempData.LoginUser.Name;
        }

        private static MainWindow win;
        public static MainWindow GetMain()
        {
            return win;
        }


        private void ChangeMenu(Page page)
        {
            Frm.Navigate(page);
        }
    }
}
